Matthias Clasen [Tue, 14 Sep 2021 16:19:13 +0000 (12:19 -0400)]
Annotate gdk_unichar_direction as const
Matthias Clasen [Tue, 14 Sep 2021 20:37:16 +0000 (20:37 +0000)]
Merge branch 'gsk-tests-gl' into 'master'
testsuite: Call g_test_init in test binaries
See merge request GNOME/gtk!3953
Matthias Clasen [Tue, 14 Sep 2021 20:11:42 +0000 (16:11 -0400)]
testsuite: Stop running tests for the gl renderer
It does not exist anymore.
Matthias Clasen [Tue, 14 Sep 2021 20:10:39 +0000 (16:10 -0400)]
testsuite: Call g_test_init in test binaries
Without it, we mess out on G_DEBUG=fatal-warnings,
so our ci does not alert us that we run a bunch of
tests which spit out warnings.
Matthias Clasen [Tue, 14 Sep 2021 13:29:28 +0000 (13:29 +0000)]
Merge branch 'fix_accessible_described_by' into 'master'
Fix generation of accessible description in presence of described by relations
See merge request GNOME/gtk!3948
Matthias Clasen [Tue, 14 Sep 2021 13:14:10 +0000 (13:14 +0000)]
Merge branch 'test-leak-fixes' into 'master'
testsuite: Fix a few memory leaks
See merge request GNOME/gtk!3947
Lukáš Tyrychtr [Tue, 14 Sep 2021 12:33:30 +0000 (14:33 +0200)]
Fix generation of accessible description in presence of described by relations
The loop going through the relation list should have stopped on the NULL sentinel value, however it never accesed the next list element.
Matthias Clasen [Tue, 14 Sep 2021 12:24:36 +0000 (08:24 -0400)]
testsuite: Fix a few memory leaks
These are keeping the asan build in ci from passing.
Matthias Clasen [Tue, 14 Sep 2021 12:27:39 +0000 (12:27 +0000)]
Merge branch 'tiff-ci' into 'master'
ci: Add libtiff-devel to the image
See merge request GNOME/gtk!3946
Matthias Clasen [Tue, 14 Sep 2021 12:05:09 +0000 (08:05 -0400)]
ci: Use the v4 image
Matthias Clasen [Tue, 14 Sep 2021 12:03:41 +0000 (08:03 -0400)]
ci: Add libtiff-devel to the image
We want to require libtiff in our build.
Matthias Clasen [Tue, 14 Sep 2021 11:36:25 +0000 (11:36 +0000)]
Merge branch 'wip/exalm/papercuts' into 'master'
Fix 2 papercuts
See merge request GNOME/gtk!3945
Alexander Mikhaylenko [Tue, 14 Sep 2021 07:23:03 +0000 (12:23 +0500)]
media-controls: Make play button flat
Match the volume button.
Alexander Mikhaylenko [Tue, 14 Sep 2021 07:22:45 +0000 (12:22 +0500)]
searchbar: Vertically center the close button
Matthias Clasen [Mon, 13 Sep 2021 16:10:37 +0000 (16:10 +0000)]
Merge branch 'fix_#4255' into 'master'
stack: Dispose children before emitting items-changed
Closes #4255
See merge request GNOME/gtk!3943
Julian Sparber [Mon, 13 Sep 2021 14:29:30 +0000 (16:29 +0200)]
stack: Dispose children before emitting items-changed
This makes sure that the `GListModel` returned by
`gtk_stack_get_pages()` actually has the items removed before
`items-changed` is emitted.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4255
Benjamin Otte [Mon, 13 Sep 2021 00:16:30 +0000 (00:16 +0000)]
Merge branch 'wip/otte/texture-threads' into 'master'
gltexture: Make sure downloading textures works in a different thread
See merge request GNOME/gtk!3942
Benjamin Otte [Sun, 12 Sep 2021 23:49:56 +0000 (01:49 +0200)]
ngl: Simplify and unbug texture download
If we can't handle the texture, always just download_texture() it,
that way we are sure it's a memory texture.
Benjamin Otte [Sun, 12 Sep 2021 22:19:35 +0000 (00:19 +0200)]
gltexture: Make sure downloading textures works in a different thread
This happens in the real world when using the inspector to look at a
node recording of a GStreamer video while the video is still playing.
GStreamer will use the GL context in a different thread while we are
busy trying to download it.
A test is included.
Philipp Kiemle [Sun, 12 Sep 2021 21:45:26 +0000 (21:45 +0000)]
Update German translation
(cherry picked from commit
17d828fda2137eaa068de947171214db8ec7b074)
Benjamin Otte [Sun, 12 Sep 2021 12:55:00 +0000 (12:55 +0000)]
Merge branch 'wip/otte/float-textures' into 'master'
Add float texture formats
See merge request GNOME/gtk!3940
Balázs Úr [Sun, 12 Sep 2021 06:03:58 +0000 (06:03 +0000)]
Update Hungarian translation
Benjamin Otte [Sun, 12 Sep 2021 02:34:42 +0000 (04:34 +0200)]
testsuite: Add tests for gdk_texture_download_float()
Benjamin Otte [Sat, 11 Sep 2021 22:11:44 +0000 (00:11 +0200)]
testsuite: Add memory test support for OpenGL up/downloads
Use a GL renderer to upload textures (and then optionally download them
via release() again). This way, we can test that the GL renderer
properly uploads textures to the right formats (not losing information
for HDR for example) and downloads them again.
Benjamin Otte [Sat, 11 Sep 2021 20:50:09 +0000 (22:50 +0200)]
testsuite: Add tests uploading the memorytextures
Use a GL renderer and render_texture() them.
Benjamin Otte [Sat, 11 Sep 2021 20:26:37 +0000 (22:26 +0200)]
testsuite: Rework memorytexture test some more
Instead of predefined colors, generate them randomly.
Benjamin Otte [Sat, 11 Sep 2021 19:19:48 +0000 (21:19 +0200)]
testsuite: Overhaul memorytexture test
Instead of hardcoding pixel values, allow construction of textures by
filling them with GdkRGBA values.
Benjamin Otte [Sun, 12 Sep 2021 03:04:32 +0000 (05:04 +0200)]
gl: Implement uploading and downloading HDR formats
Also refactor the GL uploading so it does the fallback in a
GLES-compatible way, which means we only need one fallback.
Benjamin Otte [Sat, 11 Sep 2021 19:18:56 +0000 (21:18 +0200)]
memorytexture: Add support for HDR formats
Also sanitize the input bytes so the strides match alignment
requirements of the data types.
Benjamin Otte [Fri, 10 Sep 2021 00:40:21 +0000 (02:40 +0200)]
texture: Add gdk_texture_download_float()
Benjamin Otte [Sat, 11 Sep 2021 22:10:10 +0000 (00:10 +0200)]
gdk: Deprecate gdk_cairo_draw_from_gl()
It's broken with various pixel formats and OpenGL ES, it's hard to
understand what everything does, and gdk_texture_download() can be used
instead.
Benjamin Otte [Sat, 11 Sep 2021 22:14:19 +0000 (00:14 +0200)]
gltexture: Implement download() via glGetTexImage()
1. The download via gdk_cairo_draw_from_gl() was broken sometimes
2. We get easy conversion on fallback by chaining up and using
download_texture().
3. One more place where Cairo is no longer necessary.
Benjamin Otte [Sun, 12 Sep 2021 03:11:58 +0000 (05:11 +0200)]
gltexture: Make release() use download_texture()
1. It avoids Cairo, and in particular conversion to Cairo.
2. Keeping a texture allows easy chaining in the vfuncs.
3. Using a texture means releasing will work for HDR formats
too, once we add them.
Benjamin Otte [Sun, 12 Sep 2021 02:42:24 +0000 (04:42 +0200)]
texture: Add gdk_texture_download_texture()
A private vfunc that downloads a texture as a GdkMemoryTexture in
whatever format the texture deems best.
There are multiple reasons for this:
* GLES cannot download the Cairo format. But it can download some
format and then just delegate to the GdkMemoryTexture implementation.
* All the other download vfuncs (including the ones still coming) can
be implemented via download_texture() and delegation, making the
interface easier.
* We want to implement image loading and saving support. By using
download_texture(), we can save in the actual format of the texture.
* A potential GdkCompressedTexture could be implemented by just
providing this one vfunc as a compress() step.
Benjamin Otte [Thu, 9 Sep 2021 00:05:08 +0000 (02:05 +0200)]
texture: Add GdkMemoryConversion private enum
Now gdk_memory_convert() converts to one of these conversions instead of
re(ab)using parts of the GdkMemoryFormat enum.
Benjamin Otte [Sat, 11 Sep 2021 22:09:11 +0000 (00:09 +0200)]
gltexture: release() to a texture, not a cairo_surface
This makes forwarding vfuncs a lot easier, because we can just call them
on the texture.
Benjamin Otte [Wed, 8 Sep 2021 18:46:25 +0000 (20:46 +0200)]
texture: Remove unused argument from vfunc
Balázs Úr [Sat, 11 Sep 2021 23:45:21 +0000 (23:45 +0000)]
Update Hungarian translation
Benjamin Otte [Sat, 11 Sep 2021 20:56:39 +0000 (20:56 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
rendernode: Write the whole node
See merge request GNOME/gtk!3938
Benjamin Otte [Sat, 11 Sep 2021 04:06:02 +0000 (06:06 +0200)]
rendernode: Write the whole node
It turns out g_output_stream_write_bytes() does not write the bytes.
It should be renamed to g_output_stream_write_some_of_the_bytes() maybe.
Benjamin Otte [Sat, 11 Sep 2021 12:57:25 +0000 (12:57 +0000)]
Merge branch 'hsl' into 'master'
gdk_rgba_parse: Support HSL colors
See merge request GNOME/gtk!3899
Guillaume Bernard [Sat, 11 Sep 2021 09:41:11 +0000 (09:41 +0000)]
Update French translation
(cherry picked from commit
8ffd7e9f87cfd3ce51c6b4b7a91bfe40670c89bb)
Guillaume Bernard [Sat, 11 Sep 2021 09:36:29 +0000 (09:36 +0000)]
Update French translation
(cherry picked from commit
f433c543fe7a11953362f09274f9e29d088815f9)
Matthias Clasen [Sat, 11 Sep 2021 02:53:43 +0000 (02:53 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Stop using config.h.meson
See merge request GNOME/gtk!3936
Matthias Clasen [Wed, 8 Sep 2021 23:50:09 +0000 (19:50 -0400)]
Refactor gdk_gl_context_upload_texture slightly
Introduce a gl_internalformat variable. This will
let us handle more formats in a uniform way in
future commits.
Matthias Clasen [Fri, 10 Sep 2021 11:46:24 +0000 (07:46 -0400)]
Add vectorized half-float conversion
We can't make the -4 versions inline, since
we use ifuncs for them, so make vectorized
versions.
Test included.
Matthias Clasen [Sat, 11 Sep 2021 00:51:11 +0000 (20:51 -0400)]
Stop using config.h.meson
It isn't necessary and makes us miss defines when
we forget to update it.
James Westman [Sun, 29 Aug 2021 02:08:47 +0000 (21:08 -0500)]
gdk_rgba_parse: Support HSL colors
Philipp Kiemle [Fri, 10 Sep 2021 19:55:29 +0000 (19:55 +0000)]
Update German translation
(cherry picked from commit
6228954524cfe153b20673f356a26eaba9f9e846)
Matthias Clasen [Fri, 10 Sep 2021 13:54:37 +0000 (13:54 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Fix the testupload test
See merge request GNOME/gtk!3934
Matthias Clasen [Fri, 10 Sep 2021 12:05:29 +0000 (08:05 -0400)]
Fix the testupload test
This can only ever have worked by accident.
Emin Tufan Çetin [Fri, 10 Sep 2021 06:40:43 +0000 (06:40 +0000)]
Update Turkish translation
Anders Jonsson [Wed, 8 Sep 2021 20:25:27 +0000 (20:25 +0000)]
Update Swedish translation
Boyuan Yang [Sun, 5 Sep 2021 20:33:21 +0000 (20:33 +0000)]
Update Chinese (China) translation
Daniel Șerbănescu [Sun, 5 Sep 2021 18:43:29 +0000 (18:43 +0000)]
Update Romanian translation
(cherry picked from commit
bb72acf9cd341ca30c55a0392c842e955b42e58d)
Daniel Șerbănescu [Sun, 5 Sep 2021 18:34:20 +0000 (18:34 +0000)]
Update Romanian translation
(cherry picked from commit
63d829bbc182bb06fe28a2e649f50360bc4442b8)
Matthias Clasen [Sun, 5 Sep 2021 17:26:13 +0000 (17:26 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
inspector: Cosmetics
See merge request GNOME/gtk!3925
Matthias Clasen [Sun, 5 Sep 2021 16:59:11 +0000 (12:59 -0400)]
inspector: Cosmetics
Make some settings entries smaller, and make the
scales match in size. Also, inline adjustments
in the ui file, since we can do that now.
Matthias Clasen [Sun, 5 Sep 2021 16:12:34 +0000 (16:12 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Avoid hand-rolled color glyph information
See merge request GNOME/gtk!3924
Matthias Clasen [Sat, 4 Sep 2021 13:41:20 +0000 (09:41 -0400)]
Bump pango req to 1.49.1
We are using pango api that was introduced in 1.49.1
without ifdefs, so we should require it.
Matthias Clasen [Sat, 4 Sep 2021 13:39:29 +0000 (09:39 -0400)]
Avoid hand-rolled color glyph information
Followup to
b244f31337eea. Pango provides color glyph
information for us now, so we don't need to steal a
bit anymore.
Anders Jonsson [Sun, 5 Sep 2021 14:11:36 +0000 (14:11 +0000)]
Update Swedish translation
(cherry picked from commit
19af9601636691fe13ba15bc4b69f18df175c7ca)
Yaron Shahrabani [Sun, 5 Sep 2021 13:45:49 +0000 (13:45 +0000)]
Update Hebrew translation
Matthias Clasen [Sun, 5 Sep 2021 04:21:29 +0000 (04:21 +0000)]
Merge branch 'better-font-rendering-demo' into 'master'
gtk-demo: Improve the font rendering demo
See merge request GNOME/gtk!3923
Matthias Clasen [Sun, 5 Sep 2021 03:31:05 +0000 (23:31 -0400)]
gtk-demo: Font rendering - Add some bling
Fade the outlines and pixels in and out.
Matthias Clasen [Sun, 5 Sep 2021 02:59:26 +0000 (22:59 -0400)]
gtk-demo: Font rendering - expand docs
Matthias Clasen [Sun, 5 Sep 2021 02:30:54 +0000 (22:30 -0400)]
gtk-demo: Font rendering - Add keynav
Add mnemonics to most controls, and make
Ctrl+/- change the zoom.
Matthias Clasen [Sun, 5 Sep 2021 01:20:55 +0000 (21:20 -0400)]
gtk-demo: Font rendering - add outlines
Should outlines as well.
Matthias Clasen [Sun, 5 Sep 2021 00:49:01 +0000 (20:49 -0400)]
gtk-demo: Font rendering - better start
Turn antialiasing on initially, and turn the
extents and grid off. Otherwise we show pretty
shocking rendering right from the start.
Matthias Clasen [Sun, 5 Sep 2021 00:28:59 +0000 (20:28 -0400)]
gtk-demo: Font rendering - improve the grid
Allow changing the character shown in the grid.
Matthias Clasen [Sun, 5 Sep 2021 02:43:44 +0000 (22:43 -0400)]
Cosmetics
Remove an unused object from the font rendering
demo ui file.
Matthias Clasen [Sat, 4 Sep 2021 23:39:10 +0000 (23:39 +0000)]
Merge branch 'ebassi/accel-parse-doc' into 'master'
Improve the gtk_accelerator_parse() docs
See merge request GNOME/gtk!3921
Matthias Clasen [Sat, 4 Sep 2021 21:39:30 +0000 (21:39 +0000)]
Merge branch 'text-fixes' into 'master'
textview: fix pango context invalidation
See merge request GNOME/gtk!3922
Asier Sarasua Garmendia [Sat, 4 Sep 2021 20:54:26 +0000 (20:54 +0000)]
Update Basque translation
(cherry picked from commit
0768addbb3e79879fd8d4b207320f94ae8d69906)
Matthias Clasen [Sat, 4 Sep 2021 18:46:32 +0000 (14:46 -0400)]
textview: Invalidate Pango contexts
We need to invalidate the Pango contexts when
font settings change. Use the new helper
gtk_widget_update_pango_context to make it less
likely that we forget to update some things.
Matthias Clasen [Sat, 4 Sep 2021 19:35:11 +0000 (15:35 -0400)]
widget: Provide a helper for updating pango contexts
Matthias Clasen [Sat, 4 Sep 2021 19:16:25 +0000 (15:16 -0400)]
Rename an internal function
It occupies a name I want to reuse for something else.
Matthias Clasen [Sat, 4 Sep 2021 18:52:15 +0000 (14:52 -0400)]
Revert "gsk: Add font options to text nodes"
This reverts commit
f1347f5841ea526c7016a8fbd329b45001812a23.
Matthias Clasen [Sat, 4 Sep 2021 18:52:05 +0000 (14:52 -0400)]
Revert "gsk: Add font options to the glyph cache"
This reverts commit
6599cb001fa184ed224c655519d659f168e9face.
Matthias Clasen [Sat, 4 Sep 2021 18:51:54 +0000 (14:51 -0400)]
Revert "gsk: Pass font options along"
This reverts commit
299c7c35148e49369c151aa4eae6066d09e9d4b4.
Matthias Clasen [Sat, 4 Sep 2021 18:51:41 +0000 (14:51 -0400)]
Revert "gtk: Pass font options along"
This reverts commit
062a15310aefd7feac19a5b7d2c3257d317dfff9.
Goran Vidović [Sat, 4 Sep 2021 18:11:38 +0000 (18:11 +0000)]
Update Croatian translation
(cherry picked from commit
6fe3b21a01fd507116dfa7cb198022594eac128e)
Emmanuele Bassi [Sat, 4 Sep 2021 17:56:08 +0000 (18:56 +0100)]
Improve the gtk_accelerator_parse() docs
We need to escape the modifiers in angular brackets, or Markdown will
consider them as HTML tags.
We also should document the modifiers we're parsing.
Boyuan Yang [Sat, 4 Sep 2021 17:38:16 +0000 (17:38 +0000)]
Update Chinese (China) translation
Goran Vidović [Sat, 4 Sep 2021 17:15:55 +0000 (17:15 +0000)]
Update Croatian translation
(cherry picked from commit
543b7defec1954cfced1a4de2a073cfbf5e324ad)
Changwoo Ryu [Sat, 4 Sep 2021 09:02:48 +0000 (09:02 +0000)]
Update Korean translation
Changwoo Ryu [Sat, 4 Sep 2021 08:59:22 +0000 (08:59 +0000)]
Update Korean translation
(cherry picked from commit
0a5af7693251f02b39bb73208f58609bbd2c8fb8)
Anders Jonsson [Fri, 3 Sep 2021 22:59:22 +0000 (22:59 +0000)]
Update Swedish translation
(cherry picked from commit
2dbcad428a57bac6521600267fa2d374628e2293)
Matthias Clasen [Fri, 3 Sep 2021 18:16:33 +0000 (18:16 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
widget: Redraw when font options change
See merge request GNOME/gtk!3917
Matthias Clasen [Fri, 3 Sep 2021 17:55:39 +0000 (13:55 -0400)]
widget: Redraw when font options change
Its the right thing to do, even if it is a rare event.
Matthias Clasen [Fri, 3 Sep 2021 17:21:08 +0000 (17:21 +0000)]
Merge branch 'small-text-fixes' into 'master'
gsk: Pass font options down
See merge request GNOME/gtk!3908
Matthias Clasen [Fri, 3 Sep 2021 11:21:15 +0000 (07:21 -0400)]
gtk: Pass font options along
Pass the widget's font options along when we
are creating text nodes.
Matthias Clasen [Fri, 3 Sep 2021 11:19:36 +0000 (07:19 -0400)]
gsk: Pass font options along
Use the font options from the text node when
looking up glyphs.
Matthias Clasen [Wed, 1 Sep 2021 03:01:43 +0000 (23:01 -0400)]
gsk: Add font options to the glyph cache
The cairo_t that we create to render glyphs for
the glyph cache needs to match the font options
that are supposedly governing how glyphs are
drawn.
Since we allow font options to be different per
widget in gtk, we need to have them at least at
the level of individual render nodes. Adding them
to the lookup key for the glyph cache has the
side effect of solving another problem: We are
not flushing the cache when font options change.
Matthias Clasen [Fri, 3 Sep 2021 11:15:52 +0000 (07:15 -0400)]
gsk: Add font options to text nodes
Since font options affect how the glyphs get rendered,
we need to pass the font options down from the gtk level
to where the glyph cache is populated.
Add a new gsk_text_node_new_full api that takes a
cairo_font_options_t in addition to the other parameters.
Matthias Clasen [Fri, 3 Sep 2021 04:19:17 +0000 (00:19 -0400)]
gtk-demo: Improve the font rendering demo
Add a toggle for antialiasing, and make the metrics
hinting turn on rounding of positions, to match what
we do with settings now.
Matthias Clasen [Fri, 3 Sep 2021 14:49:09 +0000 (14:49 +0000)]
Merge branch 'wip/exalm/buttons' into 'master'
Allow custom children on GtkMenuButton
Closes #4205
See merge request GNOME/gtk!3904
Alexander Mikhaylenko [Fri, 3 Sep 2021 11:18:06 +0000 (16:18 +0500)]
menubutton: Support custom children
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4205
Matthias Clasen [Fri, 3 Sep 2021 00:55:45 +0000 (00:55 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Add a README in gtk/compose
See merge request GNOME/gtk!3916
Matthias Clasen [Fri, 3 Sep 2021 00:10:19 +0000 (20:10 -0400)]
Add a README in gtk/compose